package cn.auto.intercepter;

import javax.servlet.http.HttpServletResponse;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

public class CORSInterceptor  implements Interceptor {

	@Override
	public void intercept(Invocation inv) {
		
		inv.invoke();
		HttpServletResponse res = inv.getController().getResponse();
		res.addHeader("Access-Control-Allow-Origin", "*");
	}

}
